<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:p="http://primefaces.org/ui">
<body>
	<ui:composition>
		<p:dialog header="Clipboard" widgetVar="clipboardDialog" id="clipboard"
			visible="#{clipboardSession.notEmpty}" modal="false" showEffect="fade" hideEffect="fade"
			resizable="false" position="right,top">
			<p:outputPanel id="clipboardDetail" style="text-align:center;">

				<p:accordionPanel var="reserve"
					value="#{clipboardSession.reserveList}">
					<p:tab
						title="#{reserve.partUnit.shortName} @#{reserve.quantity} #{reserve.partUnit.shortUnit}">
						<h:panelGrid columns="2">
							<h:outputText value="Source Warehouse" />
							<h:outputText value="#{reserve.warehouse.name}" />
							
							<h:outputText value="Name" />
							<h:outputText value="#{reserve.partUnit.shortName}" />

							<h:outputText value="Brand" />
							<h:outputText value="#{reserve.partUnit.shortBrand}" />

							<h:outputText value="Part Number" />
							<h:outputText value="#{reserve.partUnit.part}" />

							<h:outputText value="Requested Qty" />
							<h:outputText value="#{reserve.quantity}" />

							<h:outputText value="Unit" />
							<h:outputText value="#{reserve.partUnit.shortUnit}" />
							
							<f:facet name="footer">
								<p:commandButton value="Discard" 
									update="#{updateDiscard}" action="#{clipboardSession.discard(reserve.id)}"/>
							</f:facet>

						</h:panelGrid>
					</p:tab>

				</p:accordionPanel>
				<br/>
				<p:commandButton value="Withdrawal..." ajax="false" action="/ret/withdraw"/>
			</p:outputPanel>
		</p:dialog>
	</ui:composition>
</body>
</html>